import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

// vue 自动导入
import AutoImport from 'unplugin-auto-import/vite'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
      uni(),
      AutoImport(
          {
            imports: ['vue', 'vue-router']
          }
      )
  ],
  server: {
    port: 5020
  },
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ["legacy-js-api"],
        // api: 'modern-compiler',
        additionalData: `@import "./src/scss/color.scss";`
      }
    }
  },
});
